package com.gykj.tap.service;

import com.serotonin.modbus4j.exception.ModbusInitException;
import com.serotonin.modbus4j.exception.ModbusTransportException;

/**
 * 写数据
 * 设置单个寄存器,写[03 Holding Register(4x)] 写一个 function ID = 6
 * @author rohto
 *
 */
public interface IWriteRegisterService {
	
	/***
	 * 写[03 Holding Register(4x)] 写一个 function ID = 6
	 * 
	 * @param slaveId
	 * @param writeOffset
	 * @param writeValue
	 * @return
	 * @throws ModbusTransportException
	 * @throws ModbusInitException
	 */
	public boolean writeRegister(int slaveId, int writeOffset, short writeValue) throws ModbusTransportException, ModbusInitException;
}
